﻿using Middleware;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace Model
{
    public class Users:BaseEntity
    {
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }
        /// <summary>
        /// 邮箱地址
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 密钥
        /// </summary>
        public string PrimaryKey { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        public string IdCard { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }
        /// <summary>
        /// 图片地址
        /// 用于头像
        /// </summary>
        public string ImageUrl { get; set; }
        public int RoleId { get; set; }
        [IgnoreDataMember]
        [ForeignKey("RoleId")]
        public Role Role { get; set; }

        public int DepartmentId { get; set; }
        [IgnoreDataMember]
        [ForeignKey("DepartmentId")]
        public Department Department { get; set; }
    }
}
